Skip to main content

ExitRepeat

Type

control structure

Summary

Exit a repeat loop.

Syntax

exit repeat

Description

Use exit repeat to exit a repeat loop, for example when a certain condition is met.

Examples

	public handler ListUpToSentinel(in pList as list, in pSentinel as string) as list

variable tElement
variable tNewList as list
put the empty list into tNewList

repeat for each element tElement in pList
if tElement is a string and tElement is pSentinel then
exit repeat
end if
push tElement onto tNewList
end repeat

return tNewList
end handler